package pers.litao.bit.order.openfeign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import pers.litao.bit.commons.utils.R;

import java.util.Arrays;
import java.util.List;

/**
 * @author 李涛
 * @date 2020-12-05 14:13
 */
@FeignClient("bit-product-service")
public interface GoodsFeignService {
    /**
     * 获取商品ID
     *
     * @param id
     * @return
     */
    @RequestMapping("/product/goods/{id}")
    R getGoodsById(@PathVariable("id") Long id);

    /**
     * 批量获取商品
     *
     * @param ids
     * @return
     */
    @RequestMapping(value = "/product/goods/goodsList/batch")
    R getGoodsListBatch(@RequestBody Long[] ids);

    /**
     * 根据ID集合查标签
     *
     * @param ids
     * @return
     */
    @RequestMapping(value = "/product/label/listByIds",method = RequestMethod.POST)
    R getListLabelByIds(@RequestBody List<Long> ids);

}
